﻿Imports System
Imports System.Workflow.ComponentModel
Imports System.Workflow.ComponentModel.Compiler

Namespace System.Workflow.ComponentModel.Design
    Friend NotInheritable Class BaseClassTypeFilterProvider
        Implements ITypeFilterProvider
        ' Methods
        Public Sub New(ByVal serviceProvider As IServiceProvider)
            Me.serviceProvider = serviceProvider
        End Sub

        Private Function System.Workflow.ComponentModel.Design.ITypeFilterProvider.CanFilterType(ByVal type As Type, ByVal throwOnError As Boolean) As Boolean Implements ITypeFilterProvider.CanFilterType
            Dim flag As Boolean = False
            If (((TypeProvider.IsAssignable(GetType(Activity), type) AndAlso type.IsPublic) AndAlso (Not type.IsSealed AndAlso Not type.IsAbstract)) AndAlso Not TypeOf type Is DesignTimeType) Then
                flag = True
            End If
            Return flag
        End Function


        ' Properties
        Private ReadOnly Property System.Workflow.ComponentModel.Design.ITypeFilterProvider.FilterDescription As String
            Get
                Return SR.GetString("CustomActivityBaseClassTypeFilterProviderDesc")
            End Get
        End Property


        ' Fields
        Private serviceProvider As IServiceProvider
    End Class
End Namespace

